import { SingleInstance } from "./singleInstance"

// 百度识图
async function run() {
    const driver = SingleInstance.create_drive();

    await driver.get("https://www.baidu.com/");

    const soutu = await driver.findElement({ css: 'span[class="soutu-btn"]' });

    await soutu.click();

    const upload = await driver.findElement({ css: 'input[class="upload-pic"]' });

    // 设置文件路径（绝对路径）
    await upload.sendKeys(__dirname + '/timg.jpg');

}

run();